package day9;

import java.io.*;

/**
 * @author oldliu
 * @since 1.0
 */
public class DAtaInAndOut {
    public static void main(String[] args) {
        try {
//            File f=new File(".");
//            System.out.println(f.getAbsolutePath());
//            DataOutputStream d=new DataOutputStream(new FileOutputStream("mydata.txt"));
////            d.writeInt(1000);
////            d.writeDouble(Math.PI);
////            d.writeBoolean(2>1);
////            d.writeBoolean(2<1);
////            d.writeUTF("刘老师");
////            d.close();
            ////111
            DataInputStream din=new DataInputStream(new FileInputStream("mydata.txt"));
            int i=din.readInt();
            double d=din.readDouble();
            boolean b1=din.readBoolean();
            boolean b2=din.readBoolean();
            String s = din.readUTF();
            din.close();
            System.out.println(i);
            System.out.println(d);
            System.out.println(b1);
            System.out.println(b2);
            System.out.println(s);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
